package com.qying.consumer.controller;


import com.qying.consumer.Bean.Result;
import com.qying.consumer.annotation.RpcReference;
import com.qying.rpc.facade.HelloFacade;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {


    @SuppressWarnings({"SpringJavaAutowiredFieldsWarningInspection", "SpringJavaInjectionPointsAutowiringInspection"})
    @RpcReference(serviceVersion = "1.0.0", timeout = 3000)
    private HelloFacade helloFacade;

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String sayHello(){
        return helloFacade.hello("mini controller");
    }

    @GetMapping("/dsa")
    public Result adas(){
        String str = "<input type='checkbox' class='ace'>";
        Result result = new Result("112", str);

        //result.bb =  result.bb.replace("\"","'");
        return  new Result("112",str);
    }

}
